<!-- Begin plan/view.tpl -->
<form method="post" action="?module=plan&action=edit&submit=true">
{opentable}
{titlebar title=$title colspan = 3}
<tr>{$year}</tr>
<tr>{$team}</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{$lg->group}</td>
	<td class="sectiontableentry1" width="80%">
		<select name="gid">
			{foreach from=$smarty.session.groups item=group}	
				<option {if ($smarty.post.gid == $group)} selected {/if} value="{$group}" >{groupname id=$group}</option >
			{/foreach}
			</select>
	</td>		
</tr>
<tr>
<td class="sectiontableentry1" colspan="2"><input type="submit" name="validate" class="button" align="center" value={$lg->OK}></td>
</tr>

</table>
{opentable}
	{if is_array($t_month) }
		<tr>
			<td> </td>
		{foreach from=$t_month key=month item=s_month}
			<td class="sectiontableheader" align="center" >{$month}</td>
		{/foreach}
		</tr>
		{if is_array($t_real) }
			<tr class="sectiontableentry2" >
				<td nowrap>{$lg->real}</td>
				{foreach from=$t_real key=versi item=value}
					<td align="center">{$value}</td>
				{/foreach}
			</tr>
		{/if}
		{if is_array($t_plan) }
			{foreach from=$t_plan key=key item=s_plan}
			<tr class="sectiontableentry2" >
				<td nowrap>{if $key eq '1'} {$lg->default} {else} {$key}{/if}</td>
				{foreach from=$t_plmth[$key] key=versi item=s_plmth}
					<td align="center">{$s_plmth}</td>
				{/foreach}
			</tr>
			{/foreach}
		{/if}
		{if $add > 0}
			<tr class="sectiontableentry1">
			<td >XXXX</td>
			{foreach from=$t_month key=month item=s_month}
				<td  align="center" ><input type="text" size="5" maxlength="5" name="{$month}" value="0" /></td>
			{/foreach}
			</tr>		
		{/if}
	{/if}
<tr>
	<td colspan="12">
	{if $add > 0}
		<input type="submit" class="button" name="add" value="{$lg->init}" />
		<input type="submit" class="button" name="save" value="{$lg->save}" />
	{else}
		<input type="submit" class="button" name="add" value="{$lg->create_versi}" />
	{/if}
		</td>
</tr>
</form>
</table>